from selenium.webdriver.common.by import By
from data002.Base.Base import Base

class Page2(Base):
    # 点击输入框
    kw = (By.ID, 'kw')

    def kw01(self):
        self.click(self.kw)

    # 输入内容
    wd = (By.CLASS_NAME, 'wd')

    def kw02(self):
        self.send_keys(self.wd, '喜羊羊')

    # 点击百度一下   su
    su = (By.XPATH, '//input(@id="su" and @class="bg s_btn")')

    def su01(self):
        self.click(self.su)

    def text_casr_baidu_02(self):
        self.url_open('https://www.baidu.com/')
        self.implicitly(5)
        self.sellp(2)
        self.kw01()
        self.sellp(3)
        self.kw02()
        self.sellp(2)
        self.su01()
        self.sellp(5)